import { ITableConfig } from './model/table.status';
import { TableServices } from './service/table.service';
import { Component, OnInit, Input, OnChanges } from '@angular/core';

@Component({
    selector:'wit-table',
    templateUrl:'table.component.html',
    providers:[TableServices]
})
export class TableComponent implements OnInit,OnChanges{

    @Input() tableConfig:ITableConfig;
    data:null;
    // menuItems:IComtextMenu[];
    constructor(){

    }
    ngOnInit(){
        // console.log(this.tableConfig);
        // this.menuItems = this.tableConfig.ComtextMenuContent;
    }
    ngOnChanges(){
        if(this.tableConfig&&this.tableConfig.data){
            this.data = this.tableConfig.data;
        }
    }
}
interface Itable{
    Header:string[];
    Columns:any[];
}